add in python

30

prime_numbers = {2, 3, 5, 7}

# add 11 to prime_numbers
prime_numbers.add(11)


print(prime_numbers)

#if the element is already in the set, it won't add it

# Output: {2, 3, 5, 7, 11}
age += 1

Comments

Submit
0 Comments